<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>JavaScript 淡旺季购买机票的价格</title>
</head>
<body>

<script>
    var s = prompt("请输入月份查询机票价格");

    if (s >=5 && s <= 10){
        var p = prompt("请输旺季入头等舱或经济舱");
        if(p == "头等舱"){
            alert("2000");

        }else {
            alert("800");
        }
    }else{
        var c = prompt("请输入淡季头等舱或经济舱");
        if(c == "头等舱"){
            alert("800");

        }else {
            alert("200");
        }
    }

</script>
</body>
</html>